/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.mes.base.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 产品BOM信息实体类
 *
 * @author BladeX
 * @since 2021-03-12
 */
@Data
@TableName("prj_prd_bom")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PrdBom对象", description = "产品BOM信息")
public class PrdBom extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 直接上级编码
	*/
		@ApiModelProperty(value = "直接上级编码")
		private String directLeaderNo;
	/**
	* 物料编号
	*/
		@ApiModelProperty(value = "物料编号")
		private String materialNo;
	/**
	* 审核状态
	*/
		@ApiModelProperty(value = "审核状态")
		private String auditStatus;
	/**
	* 审核时间
	*/
		@ApiModelProperty(value = "审核时间")
		@DateTimeFormat(
				pattern = "yyyy-MM-dd HH:mm:ss"
		)
		@JsonFormat(
				pattern = "yyyy-MM-dd HH:mm:ss"
		)
		private Date auditDatetime;
	/**
	* 每套用量（定额）
	*/
		@ApiModelProperty(value = "每套用量（定额）")
		private String quota;
	/**
	* 损耗率
	*/
		@ApiModelProperty(value = "损耗率")
		private String lossRate;
	/**
	* 顶层产品图号
	*/
		@ApiModelProperty(value = "顶层产品编码")
		private String topProductNo;
	/**
	 * 产品工序id
	 */
		@ApiModelProperty(value = "产品工序id")
		@JsonSerialize(using = ToStringSerializer.class)
		private Long prdProcedureId;
	/**
	* bom审批人
	*/
		@ApiModelProperty(value = "bom审批人")
		private String approver;
	/**
	* bom版本号
	*/
		@ApiModelProperty(value = "bom版本号")
		private String version;
	/**
	* 备注
	*/
		@ApiModelProperty(value = "备注")
		private String remark;
	/**
	* 流程定义id
	*/
		@ApiModelProperty(value = "流程定义id")
		private String processDefinitionId;
	/**
	* 流程实例id
	*/
		@ApiModelProperty(value = "流程实例id")
		private String processInstanceId;

		@ApiModelProperty(value = "数据来源")
		private String dataSource;

		@ApiModelProperty(value = "产线编码")
		private String productionLineCode;

		@ApiModelProperty(value = "配方号")
		private String formulaNo;

		@ApiModelProperty(value = "工位")
		private String stationNo;

		@ApiModelProperty(value = "ERP总成号id")
		private String erpAssemblyId;

		@ApiModelProperty(value = "料道号")
		private String channelNo;

		@ApiModelProperty(value = "程序号")
		private String applyNo;

		@ApiModelProperty(value = "错误值")
		private Integer errorValue;

		@ApiModelProperty(value = "扣料方式1工位，2站位")
		private Integer buckleType;

		private String connectNo;

		private String position;

		private Integer productTypeBom;

		private String plcPosition;
}
